from sklearn.linear_model import LinearRegression
from sklearn.datasets import load_diabetes
from sklearn.model_selection import train_test_split

ds = load_diabetes()
x, y = ds.data, ds.target
x_train,x_test,y_train,y_test = train_test_split(x,y,random_state=8)

model = LinearRegression()
model.fit(x_train,y_train)

print("w = ",model.coef_,", b = ",model.intercept_)